package es.uji.icc.robot.fanuc;



/**
 * 
 * Class to store 6 joints. This provides basic functionality similar of a vector
 *
 */

public class Joints {
	private int joint1;
	private int joint2;
	private int joint3;
	private int joint4;
	private int joint5;
	private int joint6;

	public Joints() {
	}

	public Joints(int value1, int value2, int value3, int value4, int value5, int value6) {

		joint1 = value1;
		joint2 = value2;
		joint3 = value3;
		joint4 = value4;
		joint5 = value5;
		joint6 = value6;

	}

	public Joints(RobotPosition pos) {
		this.joint1 = pos.getJoint1();
		this.joint2 = pos.getJoint2();
		this.joint3 = pos.getJoint3();
		this.joint4 = pos.getJoint4();
		this.joint5 = pos.getJoint5();
		this.joint6 = pos.getJoint6();
	}

	public int getJoint1() {
		return joint1;
	}

	public void setJoint1(int joint1) {
		this.joint1 = joint1;
	}

	public int getJoint2() {
		return joint2;
	}

	public void setJoint2(int joint2) {
		this.joint2 = joint2;
	}

	public int getJoint3() {
		return joint3;
	}

	public void setJoint3(int joint3) {
		this.joint3 = joint3;
	}

	public int getJoint4() {
		return joint4;
	}

	public void setJoint4(int joint4) {
		this.joint4 = joint4;
	}

	public int getJoint5() {
		return joint5;
	}

	public void setJoint5(int joint5) {
		this.joint5 = joint5;
	}

	public int getJoint6() {
		return joint6;
	}

	public void setJoint6(int joint6) {
		this.joint6 = joint6;
	}

	public void setJoint(int i, int value) {
		switch (i) {
		case 1:
			setJoint1(value);
			break;
		case 2:
			setJoint2(value);
			break;
		case 3:
			setJoint3(value);
			break;
		case 4:
			setJoint4(value);
			break;
		case 5:
			setJoint5(value);
			break;
		case 6:
			setJoint6(value);
			break;
		}
	}

}